$(function () {
    BASE.VIDEO_CONTENT.userAuthority();
    BASE.COMMON.commentStar('click');
    BASE.COMMON.commentStar('mouseover');
});
var  BASE = BASE||{}; //全局公用方法
BASE.VIDEO_CONTENT = (function () {
    
    /*根据用户等级显示购买会员*/
    function userAuthority() {
        var useInfo = BASE.getStore('userInfo');
        if (!useInfo || useInfo.memberType!=='V'){
            $('#buy_vip').css('display','inline-block');
        }else {
            $('#buy_vip').css('display','none');
        }
    }
    /*专辑购买*/
    function buyAlumn(obj) {
        $(obj).attr('disabled',true).text('提交中...');
        BASE.postHttp('/device/order/videoAlbum/buy',{videoAlbumId:BASE.COMMON.getId()},function (res) {
            if(res.code!=200){
                $(obj).attr('disabled',false).text('重新提交');
                BASE.clearpop(res.message);
                return;
            }
            location.href = '/userSubmitOrder.html?id='+res.data.id;
        })
    }
    return{
        userAuthority:userAuthority,
        buyAlumn:buyAlumn,
    }
})();

